//
//  UIView+XTExtension.h
//  newBooks
//
//  Created by pro2 on 2018/11/22.
//  Copyright © 2018 pro2. All rights reserved.
//

@interface UIView (XTExtention)

- (instancetype)firstResponder;

//拿到或设置View的frame与相关的各个信息
@property (nonatomic) CGFloat left;
@property (nonatomic) CGFloat top;
@property (nonatomic) CGFloat right;
@property (nonatomic) CGFloat bottom;

@property (nonatomic) CGFloat width;
@property (nonatomic) CGFloat height;

@property (nonatomic) CGFloat centerX;
@property (nonatomic) CGFloat centerY;

@property (nonatomic) CGPoint origin;
@property (nonatomic) CGSize  size;

@end

@interface UIView (XTLayer)

- (void)setCorner:(CGFloat)corner;
- (void)setTopCorner:(CGFloat)corner;
- (void)setBottomCorner:(CGFloat)corner;
- (void)setTopLeftCorner:(CGFloat)corner;
- (void)setBorder:(CGFloat)border color:(UIColor *)color;

- (void)setShadow:(CGSize)offset corner:(CGFloat)corner opacity:(CGFloat)opacity color:(UIColor *)color shadowColor:(UIColor *)shadowColor shadowRadius:(CGFloat)shadowRadius;

@end

@interface UIView (Screenshot)


/**
 截图保存本地相册
 */
- (void)screenShotViewSaveLibrary;

@end


@interface UIView (Controller)


/**
 获取根控制器

 @return 控制器
 */
- (UIViewController *)getCurrentViewController;

- (UIViewController*)getViewcontrollerView:(UIView*)view;

@end


